<#include "/common/freemarker/include_header.ftl">
<div class="panel panel-primary">
    <div class="panel-heading">
         数据词典处理
    </div>
    <div class="panel-body">
        <p>数据词典，就是系统的参数，比方一些下拉框的选项值
        <#--      
               ，可以通过下面后台管理界面进行设置
        <a  href="ea/systempara/search.do" target=_blank>设置界面</a>
        -->
        </p>
        <pre>
        	  <#--
                          后台:
                        
                                在action方法中，通过下面方式将 数据词典参数数据取出（见TestAction的menu_para方法）
			   rhs.put("system_para_map", 	infEa.getParaMap());
			前台:
			   
			      通过rhs["system_para_map"] 得到一个map数据格式的参数值
			<#noparse>
			    <#list  rhs["system_para_map"]["shcool"]?keys as key>
			</#noparse>
			 -->
			后台:     
			       在Controller中，调用用基类BaseController的systemparaService的getParaList(#KEY);然后把数据传到前台
			      如：rhs.addAttribute("schools", super.systemparaService.getParaList("school"));
			   
			前台:
			        通过schools得到一个List的数据
			<#noparse>
				    <#list  schools as syspara>
					   ${syspara.keyName} - ${syspara.value?if_exists} 
					</#list>
			</#noparse>	
			<#noparse>	  
				另外根据参数类型别名和参数keyName得到参数值${EaUtils.getSysParamValue($alias,$keyName)	}	
					如：${EaUtils.getSysParamValue("school","gongye")}，则显示“广州工业大学”
		    </#noparse>	 	
		展示效果如下	
		</pre>
	<#-- 
		<BR>1.下拉框<br>
		<select class=input name="service-function" size="1"  value="">
		    <#list  rhs["system_para_map"]["shcool"]?keys as key>
			   <option value="${key}">${rhs["system_para_map"]["shcool"][key]?if_exists}</option>
			</#list> 
		</select>        
        
 	<br>2.单选<br>
		<#list  rhs["system_para_map"]["shcool"]?keys as key>
		  <input type="radio" name=businesstype value="${key}" onclick="alert(this.value)" checked>${rhs["system_para_map"]["shcool"][key]?if_exists}</input>
		</#list> 
	
	<br>3.多选<br>
		<#list  rhs["system_para_map"]["shcool"]?keys as key>
		    <input type="checkbox" name=businesstype value="${key}" >${rhs["system_para_map"]["shcool"][key]?if_exists}</input>
		</#list> 
	-->
		<BR>1.下拉框<br>
		<select class=input name="service-function" size="1"  value="">
		    <#list  schools as syspara>
			   <option value="${syspara.keyName}">${syspara.value?if_exists}</option>
			</#list> 
		</select>        
        
 	<br>2.单选<br>
		  <#list  schools as syspara>
		  <input type="radio" name=businesstype value="${syspara.keyName}" onclick="alert(this.value)" checked>${syspara.value?if_exists}</input>
		</#list> 
	
	<br>3.多选<br>
		  <#list  schools as syspara>
		    <input type="checkbox" name=businesstype value="${syspara.keyName}" >${syspara.value?if_exists}</input>
		</#list>   
    </div>
    <br>3.显示参数<br>
    ${eaUtils.getSysParamValue("school","gongye")}
    
</div>





	

	
